feat(organizations): owner_add lifecycle surfaces + signup error detail#4307
Conversation
DELETE /membership-requests/:id — the invitee refuses a pending owner_add invitation and the row is dropped from the local pending list. DELETE is outside the snackbar interceptor methods, so the list refresh is the only success feedback by design. refs pierreb-devkit/Node#3831
The pending owner_add list previously offered Accept only — an unwanted invitation sat forever. Decline opens a coreConfirmDialog (same pattern as Leave), deletes the membership, refreshes the pending list, and soft-refreshes abilities via token() (refreshAbilities signs out on failure). No success toast on DELETE by design — the row disappearing is the feedback. refs pierreb-devkit/Node#3831
The members endpoint now returns pending owner_add rows; without a Status column they were indistinguishable from active members. Adds an Active/Invited chip column, hides role-change on pending rows, and keeps remove as the owner's cancel affordance with relabeled confirm copy. refs pierreb-devkit/Node#3831
An invitee with zero orgs who landed on the wall saw only domain orgs and create — their pending owner_add invitation was invisible (it only lived under My Organizations, unreachable from the wall). Fetch and render pending invitations with an inline Accept (soft token() refresh, then redirect like refresh() when currentOrganization appears) plus a See My Organizations link. refs pierreb-devkit/Node#3832
The API error envelope carries the precise reason in description (e.g. registration deactivated), but signupErrorMessage only read data/message/error/ errors and fell back to a generic line while the global interceptor toasted the real reason. Insert description right after the string-body case. refs pierreb-devkit/Node#3832
|
Warning Review limit reached
More reviews will be available in 38 minutes and 30 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4307 +/- ##
=======================================
Coverage 99.58% 99.59%
=======================================
Files 32 32
Lines 1219 1225 +6
Branches 360 361 +1
=======================================
+ Hits 1214 1220 +6
Misses 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Surfaces the owner_add membership lifecycle in the Vue app (decline flow, pending invitation visibility, and member status UI), and improves signup error messaging by preferring API-provided description when available.
Changes:
- Add Decline invitation flow in My Organizations and store support via
organizationsStore.declineMembership(...). - Enhance the org-required wall to fetch + render pending invitations with Accept CTA and a link to manage orgs.
- Improve UI feedback by adding a Status column for memberships (Active vs Invited) and refine pending-row behavior; plus surface more precise signup error text via
data.description.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/modules/users/views/user.organizations.view.vue | Adds Decline button + confirm dialog and decline handler for pending invitations. |
| src/modules/users/tests/user.organizations.view.unit.tests.js | Adds unit tests covering decline invitation UI + behavior. |
| src/modules/organizations/views/organizations.required.view.vue | Fetches pending invitations on created and renders accept CTA on the org-required wall. |
| src/modules/organizations/stores/organizations.store.js | Adds declineMembership action to DELETE membership-request and update local pending list. |
| src/modules/organizations/tests/organizations.store.unit.tests.js | Adds tests for declineMembership behavior (DELETE + local list update). |
| src/modules/organizations/tests/organizations.required.view.unit.tests.js | Adds tests for wall pending invitations rendering, accept flow, and redirect behavior. |
| src/modules/organizations/components/organizations.members.component.vue | Adds Status chip column and adjusts actions/copy for pending membership rows. |
| src/modules/organizations/tests/organizations.members.component.unit.tests.js | Adds tests for status mapping and pending-row action/menu behavior. |
| src/modules/auth/views/signup.view.vue | Prefers response.data.description when building the signup error message. |
| src/modules/auth/tests/auth.signup.view.unit.tests.js | Adds tests validating description precedence in signup error messaging. |
| <v-dialog v-model="removeDialog.show" max-width="440"> | ||
| <v-card :class="config.vuetify.theme.rounded" class="pa-4"> | ||
| <v-card-title class="text-title-large font-weight-medium"> | ||
| Remove Member | ||
| {{ removeDialog.pending ? 'Cancel Invitation' : 'Remove Member' }} | ||
| </v-card-title> | ||
| <v-card-text class="text-body-medium"> | ||
| Are you sure you want to remove <strong>{{ removeDialog.memberName }}</strong> from this organization? | ||
| <template v-if="removeDialog.pending"> | ||
| Cancel this pending invitation? | ||
| </template> | ||
| <template v-else> | ||
| Are you sure you want to remove <strong>{{ removeDialog.memberName }}</strong> from this organization? | ||
| </template> |
Summary
Vue surfaces for the owner_add membership lifecycle — the Vue half of the cross-stack pair (Node endpoints shipped in #3858). Completes #3831 + #3832.
organizationsStore.declineMembership(id)→DELETE /membership-requests/:id, drops the row fromstate.pendingInvitations, uses the softauthStore.token()refresh (notrefreshAbilities, which signs out on failure). DELETE isn't in the snackbar methods → the inline list refresh is the feedback, deliberately.active → Active/success,pending → Invited/warning — and keeps the remove button as the owner's cancel-invitation affordance (relabelled confirm copy for pending rows).owner_addinvitations (Accept) + a "See My Organizations" link, so an org-less invitee isn't dead-ended.signupErrorMessagenow prefersdata.description, so the cap-reached "Registration is currently deactivated" message surfaces precisely.Test plan
5 touched suites — organizations.store (+2 declineMembership), user.organizations.view (+4 decline), organizations.members.component (+4 status/pending), organizations.required.view (+6 wall), auth.signup.view (+2 description). 146 tests green; lint clean.
Cross-stack QA
Guardrails
npm run lintcleanCloses pierreb-devkit/Node#3831
Closes pierreb-devkit/Node#3832